﻿<ResourceDictionary
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
	<ResourceDictionary.MergedDictionaries>
		<ResourceDictionary Source="Brushes.xaml"/>
	</ResourceDictionary.MergedDictionaries>
	
	<Style TargetType="{x:Type Button}" x:Key="EmptyButton">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type Button}">
					<Border>
						<ContentPresenter />
					</Border>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style> 
	
	<Style TargetType="{x:Type Button}" x:Key="WindowButtonStyle" BasedOn="{StaticResource EmptyButton}">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type Button}">
					<Border x:Name="MainBorder" 
							Padding="5"
							BorderThickness="1">
						<ContentPresenter />
					</Border>
					
					<ControlTemplate.Triggers>
						<Trigger Property="IsMouseOver" Value="True">
							<Setter Property="Background" Value="{StaticResource MinOpacityBrush}" TargetName="MainBorder"/>
							<Setter Property="BorderBrush" Value="White" TargetName="MainBorder"/>
						</Trigger>
					</ControlTemplate.Triggers>
					
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

    <Style TargetType="{x:Type Button}" x:Key="BottomButtonStyle" BasedOn="{StaticResource EmptyButton}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Border x:Name="MainBorder" 
							Padding="3"
							BorderThickness="1">
                        <ContentPresenter />
                    </Border>

                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Background" Value="{StaticResource MinOpacityBrush}" TargetName="MainBorder"/>
                            <Setter Property="BorderBrush" Value="White" TargetName="MainBorder"/>
                        </Trigger>
                    </ControlTemplate.Triggers>

                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type ToggleButton}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <Border x:Name="MainBorder" 
							Padding="3"
							BorderThickness="1">
                        <ContentPresenter />
                    </Border>

                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Background" Value="{StaticResource MinOpacityBrush}" TargetName="MainBorder"/>
                            <Setter Property="BorderBrush" Value="White" TargetName="MainBorder"/>
                        </Trigger>
                        
                        <Trigger Property="IsChecked" Value="True">
                            <Setter Property="Background" Value="{StaticResource MinOpacityBrush}" TargetName="MainBorder"/>
                            <Setter Property="BorderBrush" Value="White" TargetName="MainBorder"/>
                        </Trigger>
                        
                    </ControlTemplate.Triggers>

                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
    <Style TargetType="Button" x:Key="LoginButtons">
        <Setter Property="SnapsToDevicePixels" Value="true"/>
        <Setter Property="OverridesDefaultStyle" Value="true"/>
        <Setter Property="MinHeight" Value="23"/>
        <Setter Property="MinWidth" Value="75"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Border x:Name="Border"  
                            CornerRadius="1" 
                            BorderThickness="1"
                            Background="{StaticResource MinOpacityBrush}"
                            BorderBrush="White">
                        
                        <ContentPresenter Margin="2"
                                          HorizontalAlignment="Center"
                                          VerticalAlignment="Center"
                                          RecognizesAccessKey="True"/>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsKeyboardFocused" Value="true">
                            <Setter TargetName="Border" Property="BorderBrush" Value="White" />
                        </Trigger>
                        <Trigger Property="IsDefaulted" Value="true">
                            <Setter TargetName="Border" Property="BorderBrush" Value="#F1EAEA" />
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter TargetName="Border" Property="Background" Value="{StaticResource MidOpacityBrush}" />
                        </Trigger>

                        <Trigger Property="IsEnabled" Value="false">
                            <Setter TargetName="Border" Property="BorderBrush" Value="LightGray" />
                            <Setter TargetName="Border" Property="Background" Value="Gray" />
                        </Trigger>

                        <Trigger Property="IsPressed" Value="true">
                            <Setter TargetName="Border" Property="Background" Value="{StaticResource MidOpacityBrush}" />
                            <!--<Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource PressedBorderBrush}" />-->
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>